package com.tutu.entity;

import org.springframework.beans.factory.InitializingBean;

/**
 * @Program: Spring_New
 * @Description: 狗实体类
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-11-25 11:34
 **/
public class Dog implements InitializingBean {

    private String name;

    private int  age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void init(){
        System.out.println("xml标签的init-method方法");
    }


    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("重写afterPropertiesSet的初始化方法");
    }

    public void shout() {
        System.out.println("汪汪汪");
    }
}
